import { configureStore, createSlice } from "@reduxjs/toolkit";

const stringSlice = createSlice({
    name: "string",
    initialState: "Hello, Redux!", // 初始状态为 Hello, Redux
    reducers: {
        updateString: (state, action) => {
            return action.payload;
        },
    },
});

export const { updateString } = stringSlice.actions;

const store = configureStore({
    reducer: stringSlice.reducer,
});

export default store;
